package cn.iocoder.yudao.module.hs.dal.mysql.qcorder;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hs.dal.dataobject.qcorder.QcOrderDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hs.controller.admin.qcorder.vo.*;

/**
 * 质检单信息 Mapper
 *
 * @author 航盛
 */
@Mapper
public interface QcOrderMapper extends BaseMapperX<QcOrderDO> {

    default PageResult<QcOrderDO> selectPage(QcOrderPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<QcOrderDO>()
                .likeIfPresent(QcOrderDO::getCode, reqVO.getCode())
                .eqIfPresent(QcOrderDO::getWarehouseId, reqVO.getWarehouseId())
                .eqIfPresent(QcOrderDO::getOperator, reqVO.getOperator())
                .betweenIfPresent(QcOrderDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(QcOrderDO::getId));
    }

}